﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebUI.BL.Contact;
namespace WebUI.AdminSite.Contact
{
    public partial class ContactDetails : System.Web.UI.Page
    {
        private string id = String.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            id = Request.QueryString["Id"];
            if (!IsPostBack)
            {
                BindDate();
            }
        }

        private void BindDate()
        {
            var repsository = new ContactBL();
            if(!String.IsNullOrEmpty(id))
            {
                var contact = repsository.GetContactById(int.Parse(id));
                txtSubject.Text = contact.Subject;
                ckey1.Text = contact.Containt;
                drpStatus.Text = contact.Status;
            }
        }
    }
}